<!-- 左侧列表式模板 -->
<template>
  <div class="template-body">
    <section class="left-side">
      <leftAsideList :propsData="propsData" :catList="catList"></leftAsideList>
    </section>
    <section class="template-content">
      <classifyAd :propsData="propsData"></classifyAd>
      <div class="navList">
          <template v-if="catList.children && catList.children.length > 0">
            <classifyGoods :propsData="propsData" v-for="(item,index) in catList.children" :key="index" :cat="item"></classifyGoods>
          </template>
          <classifyGoods :propsData="propsData" v-else></classifyGoods>
      </div>
    </section>
  </div>
</template>

<script>
import leftAsideList from "../components/leftAsideList/index.vue";
import classifyAd from "../components/classifyAd/index.vue";
import goodsList from "../components/goodsList/index.vue";
import classifyGoods from "../components/classifyGoods/index.vue";

export default {
  props: {
    propsData: {
      type: Object,
      default: {},
    },
    catList:{
      type: Array,
      default: () => {
        return []
      },
    }
  },
  mixins: [],
  components: { leftAsideList, classifyAd, goodsList, classifyGoods },
  data() {
    return {};
  },
  mounted() {},
  watch: {},
  computed: {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.template-body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding-top: 6px;
  .left-side {
    width: 101px;
    background: #f2f2f2;
    height: 100%;
  }
  .template-content {
    flex: 1;
    height: 100%;
    background: #ffffff;
    overflow-x: hidden;
    overflow-y: scroll;
    .navList {
        padding: 5px 16px;
    }
  }
  .template-content::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}
</style>
